package nciae.db.service;

import nciae.db.common.CommonResult;
import com.baomidou.mybatisplus.extension.service.IService;
import nciae.db.pojo.dto.ApiGetDateLogDTO;
import nciae.db.pojo.dto.ApiLogDTO;
import nciae.db.pojo.dto.LogDato;
import nciae.db.pojo.entity.Log;
import nciae.db.pojo.vo.ApiGetDateLogVO;
import nciae.db.pojo.vo.LogVo;
import nciae.db.pojo.vo.LogVoId;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;


import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  日志管理
 * </p>
 *
 * @author author
 * @since 2024-12-12
 */
public interface ILogService extends IService<Log> {

    //教师的评阅
    CommonResult logsave(LogDato log, HttpSession session);   //进行数据的插入
    //信息的删除
    CommonResult logDelInfo(Long id);
    //获取信息通过id，form表单回显
     LogVoId logInfo(Long id);
    //app的获取
    CommonResult<Boolean> ApilogInsert(ApiLogDTO apiLogDTO);
    //综合查询
    CommonResult<List<LogVo>> searchInfoAll(int page, int limit, Integer state, String logDate, String projectName, String className, String name,HttpSession session);

    CommonResult<String> UploadDiaryFiles(MultipartFile file, Long projectId, Long userId,String date) throws IOException;

    ResponseEntity<Resource> downloadFiles(Integer id);

}
